﻿using System;

namespace Infrastructure.NetExtensions
{
    public static class NumericExtensions
    {
        /// <summary>
        /// called from a short type varaiable, 
        /// returns the rounded up number to the closest mod 10.
        /// </summary>
        /// <param name="num">instance of the calling varaiable</param>
        /// <returns>rounded up value</returns>
        public static short Cieling(this short num)
        {
            decimal temp = (decimal)num / 10;
            temp = Math.Ceiling(temp);
            return (short)(temp * 10);
        }
    }
}